/*
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/antborrow-mgr/busdailystatistics/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/antborrow-mgr/busdailystatistics',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/antborrow-mgr/busdailystatistics/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/antborrow-mgr/busdailystatistics/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/antborrow-mgr/busdailystatistics',
    method: 'put',
    data: obj
  })
}

export function sumAmt(start, end) {
  let url = '/antborrow-mgr/busdailystatistics/calcMulTypeAmt';
  if (start != null && end != null){
    url += '?start=' + start + '&end=' + end;
  }else if (start != null) {
    url += '?start=' + start;
  }else if (end != null) {
    url += '?end=' + end;
  }
  return request({
    url: url,
    method: 'get',
  })
}
